﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class addNewApps : System.Web.UI.Page
{
    CodeDatDataContext _db2 = new CodeDatDataContext();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.loadApps();
        }
    }
    void loadApps()
    {
        var itemapp = from ap in _db2.DTVBs
                      where ap.Display == true
                      select ap;
        GridView1.DataSource = itemapp;
        GridView1.DataBind();
    }

    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;
        this.loadApps();
    }
}
